package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class BabyAddRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/add_baby_info";

    private Change[] changes;

    public Change[] getChanges() {
        return changes;
    }

    public void setChanges(Change[] changes) {
        this.changes = changes;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        BabyAddRequestBody body = new BabyAddRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setChanges(changes);
        return body;
    }

    private class BabyAddRequestBody extends BaseTokenRequestBody {

        @SerializedName("Changes")
        private Change[] changes;

        private BabyAddRequestBody() {
            setSv(BaseRequestConfig.SV_BABY_ADD);
        }

        public Change[] getChanges() {
            return changes;
        }

        public void setChanges(Change[] changes) {
            this.changes = changes;
        }
    }
}
